Android is an operating system based on a Linux open kernel and an operating system for mobile phones, which is disclosed by Google on Nov. 5, 2007. Currently, Android not only is applied to smart mobile phones, but also becomes more and more popular in the tablet PC market and the smart MP4 market.
Android adopts a framework of software stack, in which, Linux kernel on the under layer just provides basic functions, the interlayer includes a function library and a virtual machine, and on the top layer is various application software. For most application software, a personal identification number (PIN code) needs to be input when the application software is used. Usually the PIN code is encrypted so as to improve the security of the PIN code; but, a user interface (UI) on the Android platform is written in Java which can be decompiled and analyzed easily.
Thus, in prior art, the logic for encrypting the PIN code is placed on a C layer, in which layer, the PIN code is difficult to be cracked and the decompiling and analysis are difficult. A Java layer transmits the PIN code to the C layer when the PIN code is input by a user, but the PIN code may be intercepted in the process of being transmitted from the Java layer to the C layer.